﻿Public Class Archivo
    Inherits BasePersistencia

    Private _titulo As String
    Private _nombre As String
    Private _contenido As Byte()
    Private _type As String

    Sub New()
        MyBase.Persistencia = EstadoPersistencia.INSERT
    End Sub

#Region "Propiedades"

    Public Property Titulo() As String
        Get
            Return _titulo
        End Get
        Set(ByVal value As String)
            _titulo = value
        End Set
    End Property

    Public Property Nombre() As String
        Get
            Return _nombre
        End Get
        Set(ByVal value As String)
            _nombre = value
        End Set
    End Property

    Public Property Contenido() As Byte()
        Get
            Return _contenido
        End Get
        Set(ByVal value As Byte())
            _contenido = value
        End Set
    End Property

    Public Property Type() As String
        Get
            Return _type
        End Get
        Set(ByVal value As String)
            _type = value
        End Set
    End Property

#End Region

#Region "Metodos Publicos"

    Public Function Lenght() As Int64

        Try
            Return _contenido.Length
        Catch ex As Exception
            Return 0
        End Try

    End Function

#End Region


End Class
